package com.example.common.config;

import com.example.common.utils.SnowFlakeUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

@Configuration
public class AppNameConfig {
    @Value("${spring.application.name}")
    private String appName;

    @PostConstruct
    public void init() {
        SnowFlakeUtil.initSnowflake(appName);
    }
}
